package com.caochenlei.table;

public class HashTableTest {
    public static void main(String[] args) {
        HashTable<Integer, String> hashTable = new HashTable<>(16);

        hashTable.put(1, "刘备");
        hashTable.put(2, "张飞");
        hashTable.put(3, "关羽");
        hashTable.put(4, "赵云");
        hashTable.put(5, "曹操");
        hashTable.put(6, "吕布");

        System.out.println(hashTable.size());
        System.out.println(hashTable.isEmpty());
        System.out.println(hashTable.keySet());
        System.out.println(hashTable.valueSet());
        for (Integer key : hashTable.keySet()) {
            System.out.println(key + "：" + hashTable.get(key));
        }
        for (Integer key : hashTable.keySet()) {
            hashTable.delete(key);
        }
        System.out.println(hashTable.size());
        System.out.println(hashTable.isEmpty());
        System.out.println(hashTable.keySet());
        System.out.println(hashTable.valueSet());
    }
}
